package com.powerteam.mapper.crm;

import com.powerteam.model.crm.Activity;
import com.powerteam.vo.crm.QueryActivityVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 动态记录表相关操作
 *
 * @author jinming.zhang
 * @version 0.0.1
 * @date 2021/12/30
 */
@Mapper
public interface ActivityMapper {


    /**
     * 创建动态信息
     *
     * @param activity
     * @Author jinming.zhang
     * @Date 2022/1/7
     * @return int
     */
    int insert(Activity activity);

    /**
     * 根据资源信息删除动态信息
     *
     * @param activity
     * @Author jinming.zhang
     * @Date 2022/1/7
     * @return int
     */
    int deleteByResource(Activity activity);

    /**
     * 分页查询动态信息
     *
     * @param vo
     * @Author jinming.zhang
     * @Date 2022/1/9
     * @return List<Activity>
     */
    List<Activity> find(QueryActivityVO vo);

    /**
     * 删除动态信息
     *
     * @param activity
     * @Author jinming.zhang
     * @Date 2022/1/9
     * @return int
     */
    int delete(Activity activity);
}
